home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.4)
-
- ''' Python Character Mapping Codec for KOI8U.
-
- This character scheme is compliant to RFC2319
-
- Written by Marc-Andre Lemburg (mal@lemburg.com).
- Modified by Maxim Dzumanenko <mvd@mylinux.com.ua>.
-
- (c) Copyright 2002, Python Software Foundation.
-
- '''
- import codecs
- import koi8_r
-
- class Codec(codecs.Codec):
-
- def encode(self, input, errors = 'strict'):
- return codecs.charmap_encode(input, errors, encoding_map)
-
-
- def decode(self, input, errors = 'strict'):
- return codecs.charmap_decode(input, errors, decoding_map)
-
-
-
- class StreamWriter(Codec, codecs.StreamWriter):
- pass
-
-
- class StreamReader(Codec, codecs.StreamReader):
- pass
-
-
- def getregentry():
- return (Codec().encode, Codec().decode, StreamReader, StreamWriter)
-
- decoding_map = koi8_r.decoding_map.copy()
- decoding_map.update({
- 164: 1108,
- 166: 1110,
- 167: 1111,
- 173: 1169,
- 180: 1028,
- 182: 1030,
- 183: 1031,
- 189: 1168 })
- encoding_map = codecs.make_encoding_map(decoding_map)
-